package order.controller;

import lombok.extern.slf4j.Slf4j;
import order.service.OrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

@Slf4j
@RestController
public class OrderController {

    @Autowired
    OrderService orderService;

    @RequestMapping(value = "/orderByRest", method = RequestMethod.GET)
    public String orderByRest(String params) {
        return orderService.orderByRest(params);
    }

    @RequestMapping(value = "/orderByFeign", method = RequestMethod.GET)
    public String orderByFeign(String params) {
        return orderService.orderByFeign(params);
    }
}
